#ifndef SKYID_LUABIND_EXPORT_H
#define SKYID_LUABIND_EXPORT_H

#include <lua.hpp>
#include <luabind/luabind.hpp>

#include "common.h"
#include "config.h"
#include "object.h"
#include "reader.h"
#include "image.h"
#include "sound.h"
#include "music.h"
#include "texture.h"
#include "sprite.h"
#include "vfs.h"
#include "resource_manager.h"
#include "render.h"
#include "window_event.h"
#include "window.h"
#include "engine.h"
#include "script_engine.h"

namespace SkyID
{

//- LuabindExport ------------------------------------------------------------

namespace LuabindExport
{

bool initialize(lua_State *VM);
void shutdown();

struct LuabindExportStruct
{
	LuabindExportStruct(lua_State *VM);

	static void keyboardCallback(const KeyboardEvent &event);
	static void mouseMotionCallback(const MouseMotionEvent &event);
	static void mouseButtonCallback(const MouseButtonEvent &event);

	static void setKeyboardCallback(luabind::object const &callback);
	static void setMouseMotionCallback(luabind::object const &callback);
	static void setMouseButtonCallback(luabind::object const &callback);

	static void renderCallback();
	static void animateCallback(float dt);

	static void setRenderCallback(luabind::object const &callback);
	static void setAnimateCallback(luabind::object const &callback);

	luabind::object mKeyboardCallback, mMouseMotionCallback,
		mMouseButtonCallback, mRenderCallback, mAnimateCallback;
};

} // namespace LuabindExport

} // namespace SkyID

#endif // SKYID_LUABIND_EXPORT_H
